//////////////////
/// mkI - Base ///
//////////////////

namespace mk
{

MK_FORCEINLINE real32 Sqrt
(
    real32 const x
)
{
    return sqrtf(x);
}

MK_FORCEINLINE real32 Sin
(
    real32 const x
)
{
    return sinf( x );
}

MK_FORCEINLINE real32 Cos
(
    real32 const x
)
{
    return cosf( x );
}

MK_FORCEINLINE real32 Tan
(
    real32 const x
)
{
    return tanf( x );
}

MK_FORCEINLINE real32 ASin
(
    real32 const x
)
{
    return asinf( Clamp( x, -1.0f, 1.0f ) );
}

MK_FORCEINLINE real32 ACos
(
    real32 const x
)
{
    return acosf( Clamp( x, -1.0f, 1.0f ) );
}

MK_FORCEINLINE real32 Abs
(
    real32 const x
)
{
    return fabsf( x );
}

MK_FORCEINLINE real32 Floor
(
    real32 const x
)
{

}

MK_FORCEINLINE real32 Ceil
(
    real32 const x
)
{

}

MK_FORCEINLINE real32 Round
(
    real32 const x
)
{

}

MK_FORCEINLINE real32 Min
(
    real32 const a,
    real32 const b
)
{
    return a < b ? a : b;
}

MK_FORCEINLINE real32 Max
(
    real32 const a,
    real32 const b
)
{
    return a > b ? a : b;
}

MK_FORCEINLINE real32 Mod
(
    real32 const x,
    real32 const q
)
{
    return fmodf( x, q );
}

MK_FORCEINLINE real32 Lerp
(
    real32 const a,
    real32 const b,
    real32 const t
)
{
    return a + ( b - a ) * t;
}

MK_FORCEINLINE real32 Clamp
(
    real32 const x,
    real32 const min,
    real32 const max
)
{
    return Min( Max( x, min ), max );
}

MK_FORCEINLINE int Abs
(
    int const x
)
{
    return labs( x );
}

MK_FORCEINLINE bool isFinite
(
    real32 const x
)
{
    return x <= MK_REAL32_MAX;
}

} // namespace mk